<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=\, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <!-- href 属性和 vue 数据进行绑定-->
        <a v-bind:href="link">去百度</a>

        <!--对 class 和 style 进行了增强-->
        <span v-bind:class="{active:isActive, 'text-danger':hasError}"
        v-bind:style="{color:color1}">你好鸭，动态绑定,是否加上与某个属性的 true \ false 有关 class</span>
    </div>
   
    <script src="./node_modules/vue/dist/vue.js"></script>
    <script>
        new Vue({
            el: '#app',
            data:{
                link: "https://www.baidu.com",
                isActive: false,
                hasError: false,
                color1: 'blue'
            },
            method: {
                
            }
        });
    </script> 
</body>
</html>